<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ include file="include/base.jsp" %>
<!DOCTYPE HTML>
<html lang="zh-CN">
<head>
	<meta charset="UTF-8">
	<title>凯盛项目管理系统</title>
	<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css" />
	<link rel="stylesheet" type="text/css" href="css/loong.css" />
</head>
<body class="body">
	
	<%@ include file="include/top.jsp" %>
	
	
	
	<div class="container">
	  <div class="row row-inner">
		 <%@ include file="include/left.jsp" %>
		 <div class="span8">
			<ul class="breadcrumb" style="margin-bottom:0px;border-radius: 3px 3px 0 0;margin-top:15px">
				<li class="active">
					<a href="document.html"><i class="icon-folder-open"></i>资料</a>
				</li>
				<li class="pull-right"><i class="icon-plus"></i><a href="newDocument.jspx" class="link-black">分享新资料</a></li>
			</ul>
			<div class="wall" style="margin-bottom:20px;">
				<blockquote>
				<c:forEach items="${page.list }" var="document" >
				    <h4><a href="newDocument.jspx">${document.title}</a></h4>
				    <p style="font-size:14px;line-height:1.5;">${document.content}</p>
				    
				    <small>发布于 ${document.createtime}</small>
				  	 
				    <a href="editDocument.jspx?id=${document.id} " id="edit" title="编辑"><i class="icon-pencil"></i></a>
				    <a href="javascript:;" class="del"  rel="${document.id}" title="删除"><i class="icon-trash"></i></a>
				</c:forEach>
				
				</blockquote>
				<blockquote>
				<c:if test="${empty page.list} }">
					<blockquote>
                       		<h4>没有任何数据</h4>
                  </blockquote>
				</c:if>
				</blockquote>
				
				
				
			<c:if test="${page.totalPages > 1 }">
				<div class="pagination pull-right">
				  <ul>
					<li><a href="document.jspx?p=1">首页</a></li>
					<li >
					  <a href="document.jspx?p=${page.pageNum }">1</a>
					</li>
					<li><a href="document.jspx?p=${page.pageNum+1}">2</a></li>
					<li><a href="document.jspx?p=${page.pageNum+2}">3</a></li>
					<li><a href="document.jspx?p=${page.pageNum+3}">4</a></li>
					<li><a href="document.jspx?p=${page.totalPages}">末页</a></li>
				  </ul>
				</div>
			</c:if>
				<div class="clear"></div>
			</div>
		</div>
		 
	  <div>
	</div>	
	<script type="text/javascript" src="js/jquery.min.js"></script>
	<script type="text/javascript">
		$(document).ready(function(){
			$(".del").click(function(){
				if(confirm("确定要删除吗？")){
					location.href="documentDel.jspx?id="+$(this).attr("rel");
				}
			
			});
		
		});
	
	</script>
	 
</body>
</html>		 